class ProjectModel {
  num? code;
  List<ProjectItemModel>? data;
  String? message;

  ProjectModel({
    this.code,
    this.data,
    this.message,
  });

  ProjectModel.fromJson(Map<String, dynamic> json) {
    code = json['code'] as num?;
    if (json['data'] != null) {
      data = <ProjectItemModel>[];
      json['data'].forEach((v) {
        data?.add(ProjectItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['code'] = code;
    if (this.data != null) {
      data['data'] = this.data?.map((v) => v.toJson()).toList();
    }
    data['message'] = message;
    return data;
  }
}

class ProjectItemModel {
  int? id;
  String? projectName;
  int? groupId;
  String? color;

  ProjectItemModel({
    this.id,
    this.projectName,
    this.groupId,
    this.color,

  });

  ProjectItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'] as int?;
    projectName = json['project_name'];
    groupId = json['group_id'] as int?;

    color = json['color'];

  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['project_name'] = projectName;
    data['group_id'] = groupId;
    data['color'] = color;

    return data;
  }
}
